package com.example.listeners;

import org.flowable.common.engine.api.delegate.event.FlowableEvent;
import org.flowable.common.engine.api.delegate.event.FlowableEventListener;
import org.springframework.stereotype.Component;

@Component
public class MyEventListener implements FlowableEventListener{

	@Override
	public void onEvent(FlowableEvent event) {
//		event.getType();
//		switch (event.getType()) {
//	      case JOB_EXECUTION_SUCCESS:
//	        System.out.println("A job well done!");
//	        break;
//	      case JOB_EXECUTION_FAILURE:
//	        System.out.println("A job has failed...");
//	        break;
//	      default:
//	        System.out.println("Event received: " + event.getType());
	}

	@Override
	public boolean isFailOnException() {
		return false;
	}

	@Override
	public boolean isFireOnTransactionLifecycleEvent() {
		return false;
	}

	@Override
	public String getOnTransaction() {
		return null;
	}
}
